package com.dongzili.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

/**
 * 性别枚举
 */
@Getter
//@JsonSerialize(using = EnumDescSerializer.class)
//@JsonDeserialize(using = EnumDescDeserializer.class)
public enum SexEnum {
    /**
     * 未知
     */
    UNKNOWN(0, "未知"),
    /**
     * 男
     */
    MALE(1, "男"),
    /**
     * 女
     */
    FEMALE(2, "女");
    /**
     * 枚举值
     */
    @EnumValue
    private final Integer code;
    /**
     * 描述
     */
    @EnumDesc
    private final String desc;

    SexEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

}
